Welcome to Expert Viewpoints: Introductory
thoughts on Sever-side JavaScript and Node.js. In this video, we will hear from
several application development professionals discussing working with
server-side JavaScript and Node.js. The wonderful thing about using
Node.js as your back-end language is it's the same as your front-end language. So it makes it easier (kind of) to context switch between writing for the front end
and then writing for the back end. You can have the same developers
basically writing both. I mean a lot of developers
know multiple languages. But this way, if you've got
someone very strong at JavaScript, all that knowledge will pay off in
both the front end and the back end. And you can also use the same
code scanning and code testing for the front-end JavaScript
as for the back-end JavaScript. So that and like the
dependency security scanning and all of that, both the front end
and the back end are going to be using NPM, the node package management, for the dependencies. And that way, you've got kind of a unified
approach to dependencies and packages. I think the most obvious appeal of using
Node.js, at least for full-stack developers, is that you get to use the same
language client side and server side. So if you're a new developer, that's
one less language you have to learn. And even if you're not, it can be
nice to minimize the differences when context-switching between
front-end and back-end development. Another benefit is actually the community
surrounding Node.js. I think on the most recent Stack Overflow survey it was being used by over 50% of professional developers. And that's really reflected
in the wealth of learning resources and support that are available to you. If you are a front-end developer,
if you understand JavaScript, then picking up back end using a framework
like Node.js is not that much of a stretch. I actually started building static websites, and then slowly learned how to put
in dynamic content using JavaScript. And then I had to use Java or PHP to
build my back-end systems on the server. There's a little bit of a context switch
when you're doing that, but Node.js, the cool thing is, you're using
JavaScript on the front end, and you're using JavaScript
on the back end as well. So there's a little bit less of a context switch. It's easy to switch between working with services on the back end and then going to your
website and putting in some JavaScript. The one thing that I did find a
little bit odd at first was the single-threaded nature of Node.js
in everything relying on callbacks. So asynchronous programming using callbacks is a little bit of a twist with Node.js. But
it's a matter of getting used to that. The one thing I did like was
the abundance of packages in registries like NPM for you to be
able to use in your applications. Key benefit of using Node.js is faster processing. It can handle concurrent requests faster
than any other server-side languages. Node.js is a popular choice for online gaming, chats, video conferences, or any solution
that requires constantly updated data. It is easier to learn Node.js if one
already has a good grasp on JavaScript. Developers can write both front end and back
end in Javascript using a runtime environment. There is no need for separate front-end
and back-end developers in this case. JavaScript is obviously the de facto
standard for client-side web development. And so it quite naturally makes sense to allow JavaScript developers to leverage
those skills on the server side. And that's where Node.js fits in nicely. The big deal with Node.js is
its architecture as it offers a rather unique single-threaded, asynchronous, event-oriented architecture that enables it to handle a very large number
of concurrent connections. Think hundreds of thousands
of concurrent connections. Node.js is built on top of Google's
Chrome JavaScript V8 engine. Parsing JSON is blazingly fast because
JSON is a native data type in JavaScript. And Node.js also fits very nicely into the
adoption of microservices since each microservice is dedicated to one or a small number of cohesive services and is inherently
therefore limited in scope.